package com.jxl.domain.service.impl;

import cn.dev33.satoken.secure.SaSecureUtil;
import com.jxl.common.enums.DeletedCodeEnum;
import com.jxl.domain.convert.AuthUserBOConvert;
import com.jxl.domain.convert.AuthUserRoleBOConvert;
import com.jxl.domain.entity.AuthUserBO;
import com.jxl.domain.entity.AuthUserRoleBO;
import com.jxl.domain.service.AuthUserDomainService;
import com.jxl.domain.service.AuthUserRoleDomainService;
import com.jxl.infra.basic.entity.AuthUser;
import com.jxl.infra.basic.entity.AuthUserRole;
import com.jxl.infra.basic.service.AuthUserRoleService;
import com.jxl.infra.basic.service.AuthUserService;
import org.springframework.stereotype.Service;

import javax.annotation.Resource;


@Service
public class AuthUserRoleDomainServiceImpl implements AuthUserRoleDomainService {

    @Resource
    private AuthUserRoleService authUserRoleService;


    @Override
    public Boolean add(AuthUserRoleBO authUserRoleBO) {
        AuthUserRole authUserRole =
                AuthUserRoleBOConvert.INSTANCE.convertBOToAuthUserRole(authUserRoleBO);
        AuthUserRole insert = authUserRoleService.insert(authUserRole);
        return insert!=null;
    }
}
